import responses

from unittest import TestCase
from pagamigo.RequestSession import RequestSession


class TestRequestSession(TestCase):
    @responses.activate
    def test_send_request(self):
        responses.add(responses.GET, 'https://paypal.com/example',
                      json={'hello': 'world'}, status=200)
        session = RequestSession("https://paypal.com")
        response = session.send_request("/example", {"hello": "me"})

        assert response == {'hello': 'world'}
